<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view>
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
		<head>
			<meta http-equiv="pragma" content="no-cache" />
			<meta http-equiv="cache-control" content="no-cache" />
			<meta http-equiv="expires" content="0" />
			<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
			<meta http-equiv="description" content="This is my page" />
			<title><h:outputText value="添加用户" /></title>
		</head>
		<body>
			<h1>
				<h:outputText value="添加用户" />
				<font size="2"></font>
			</h1>
			<h:messages />
			<h:form>
				<table>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_loginName}"></h:outputLabel>
						</td>
						<td>
							<h:inputText value="#{$.user.loginName}" required="true" />
						</td>
					</tr>

					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_email}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.user.email}" required="true" />
						</td>
					</tr>

					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_userName}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.user.userName}" required="true" />
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_password}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.user.password}" required="true" />
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_userRole}"></h:outputLabel>
						</td>
						<td>
							<h:selectOneMenu required="true"  value="#{$.user.userRole}" requiredMessage="you are required">
								<f:selectItem value="#{$.roleList}" />
							</h:selectOneMenu>
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel value="#{$bundle.label_user_phone}"></h:outputLabel>
						</td>
						<td>
							<h:inputText size="" value="#{$.user.phone}" required="true" />
						</td>
					</tr>

					<tr>
						<td>
						</td>
						<td>
							<h:commandButton value="添加"  action="#{$.addUser}" />
						</td>
					</tr>
				</table>

			</h:form>
		</body>
	</html>
</f:view>
